Skip to content

fix: exports without a path never overwrite an earlier export - #28

Merged
nodemode-ai merged 2 commits into
mainfrom
fix/owner-decisions-2026-11-29
Nov 30, 2026
Merged

nodemode-ai merged 2 commits into
mainfrom
fix/owner-decisions-2026-11-29

Conversation

@gbarnai

@gbarnai gbarnai commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Exports with no path never replace an earlier export: each takes the next free name in the Exports folder (Title.pptx, Title (2).pptx, ...), and the response carries the served url of the new file.
  • New names are claimed atomically (hard link, or exclusive create where links are unavailable), so concurrent exports never share a name and a failed write leaves no file.
  • The deck export route and the export_deck agent tool follow the same rule; a path the person chose is still replaced whole.

Tests

  • Each change has tests that fail on the code before it.
  • The repo's CI commands were run locally on macOS; every local failure also fails on main in the same environment. Please rely on this PR's CI for Linux and Windows.

How to ship

  • Follows the earlier hardening PR, already merged. Independent of other repos. No version bump.

An export with no path went to the Exports folder under the deck title,
so exporting the same deck again replaced the earlier file. Each such
export now takes the next free name (Title.pptx, Title (2).pptx, ...),
claimed with a hard link or an exclusive create so concurrent exports
never share a name, and the answer carries the served url of the new
file. The deck export route and the export_deck agent tool follow the
same rule. A path the person chose is still replaced whole.
A deck title with a leading dash or dot, or a run of dots, gave an
Exports file name that /api/exports refuses, so the url in the answer
did not answer. write_new now tidies the name before claiming it, so
every route that writes a new export hands out a url that is served.
On a disk without hard links, a failed move over the empty claim now
removes the claim, so a failed write leaves no file behind.
@gbarnai
gbarnai requested a review from nodemode-ai as a code owner November 29, 2026 21:21
@nodemode-ai
nodemode-ai merged commit 8463252 into main Nov 30, 2026
5 checks passed
@nodemode-ai
nodemode-ai deleted the fix/owner-decisions-2026-11-29 branch November 30, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants